Automating Excel export

Hi,

I am trying to automate the export of a  module to excel file.

I took reference from the below thread and created all the files.

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014305335

 

But how do i override the GUI parts for the excel. As i cant find the script in library scripts in DOORS.

I am getting error for "set(exportHeadingsToggle, false)" and "doExport theDiag", obviously as these functions are used for Word export.

How do i make the relevant changes for the export to excel.

Any help is appreciated.

 

Please see my code below for reference.I have highlighted the places of error.

 

    // override some default message box functions, so they will only print the data but

    // not pause execution. Write to a log file here!

     

    bool confirm (string s) { print "Confirmed: " s "\n"; return true }

    void ack (string s) {print "Acknowledge: " s "\n" }

    // void acknowledge (string s) {print "Acknowledge: " s "\n"  }

    void infobox (string s) {print "Info: " s "\n" }

    void info (string s) {print "Info: " s "\n" }

     

    DB theDiag = null

     

    // Now override block and show, to only do realize

    void show  (DB x) { realize x; theDiag = x }

    void block (DB x) { realize x; theDiag = x }

     

    if (null current Module) {

    print "You need to have a current Module set for the export."

    halt

    }

     

    // we need braces, since -D will be executed at top level and we will get name

    // clashes for variable defined in word.dxl and the other includes of it.

    {

    // now include the word.dxl -> this will pop up the dialog, but not halt execution

    // due to the overrides above

    <standard/export/office/excel.dxl>

     

    // here we can change the dialog options. See itfui2.inc and word.dxl for all

    // the options

   set(exportHeadingsToggle, false)   // turn off export of headings //ERROR HERE

      set(exportLayoutChoice, 1)

    // now manually launch the export button callback

    doExport theDiag //ERROR HERE

     

    // get rid of the dialog

    if (!null theDiag) destroy theDiag

     

    // close DOORS

    exit_

    }

 


Gsquare - Tue Dec 06 07:02:44 EST 2016

Re: Automating Excel export
Mathias Mamsch - Tue Dec 06 17:01:34 EST 2016

Did you check this:

https://www.ibm.com/developerworks/community/forums/html/topic?id=be15bd5d-b64b-49b4-9b85-e354c36ee0c4&ps=25

or that:

https://www.ibm.com/developerworks/community/forums/html/topic?id=ed087dbe-a215-49e4-88fb-22d149b9d1df&ps=25

or that:

https://www.ibm.com/developerworks/community/forums/html/topic?id=e46b5bcc-0597-4bc2-9454-cd963300e628&ps=25

Regards, Mathias

PS: I searched for "excel confirm ack infobox"